<div class="row-fluid container_bg">
<div ng-include="'side-menu.html'"></div>
<div class="span9 pos_r" style="padding-right:20px;">
	<div class="container_title">
		<div class=""><h1>Order History</h1></div>
		<div  id="success_alert" class="alert_sucess alert alert-success span11" style="display:none;">
			<i class="icon-ok"></i>&nbsp;&nbsp;
			<span  id="cancelled_order"></span>
		</div>
		<div class="container_form_top table-responsive" id="orderHistory">
			<table ng-table="tableParams" class="table">
						<tr ng-repeat="user in $data">
							<td data-title="'Send Date'">{{user.date_added}}</td>
							<td data-title="'Prescription'">
								Tabletname:{{user.Tabletname}}<br/>
								Quantity:{{user.Quantity}}<br/>
								<a ng-if='user.preLength >1' ng-click="openPopups(1,user.user_medicine_order_id)" href="javascript:void(0);" >ViewAll</a></td>
							<td data-title="'Attachment'">
								<p>
									<img ng-src="{{user.preImage}}" width="100px" height="100px"/>
								</p>
								<a ng-if='user.preImageLength >1' href="javascript:void(0);" ng-click="openPopups(3,user.user_medicine_order_id)">ViewAll</a>
							</td>
							<td id='st{{user.user_medicine_order_id}}' data-title="'Status'">
								<p ng-if='user.status==0'>Pending</p>
								<p ng-if='user.status==1'>Processing</p>
								<p ng-if='user.status==2'>Processed</p>
								<p ng-if='user.status==3'>Cancelled</p>
							</td>
							<td id='ac{{user.user_medicine_order_id}}' data-title="'Action'">
								<a ng-if='user.status==0' href="javascript:void(0)" ng-click="cancelOrder(user.user_medicine_order_id)">Cancel/</a>
								<!--<a ng-if='user.status==0' href="javascript:void(0)" onclick="sendQuotationPopUp('+user.pincode+','+user.user_medicine_order_id+');" >Send Quotation</a>-->
								
								
								<a ng-if='user.status==1' href="javascript:void(0)" ng-click="cancelOrder(user.user_medicine_order_id)">Cancel/</a>
								<!--<a ng-if='user.status==1' href="javascript:void(0)"   onclick="sentQuotationPopUp('+user.user_medicine_order_id+');">Confirm Shop</a>-->
								
								<!--<a ng-if='user.status==2' href="javascript:void(0)" onclick="cancelOrder('user.user_medicine_order_id')" >Cancel/</a>-->
								
								<a  href="javascript:void(0)" ng-click="openPopups(2,user.user_medicine_order_id)">View</a>
								<input type="hidden" id="location'+user.user_medicine_order_id+'" value="'+user.location+'">
							</td>
						</tr>
					</table>
		</div>
	</div>          
</div><!--/span-->
</div><!--/.fluid-container-->
<script id="viewDetails.html" type="text/ng-template">
	<div class="ngdialog-message" >
		<div class="modal-header">
			<h3 id="myModalLabel">Order Detailes</h3>
		</div>
		<table class="table table-condensed" ng-bind-html="allDetails">
		</table>	
	</div>
</script>
<script id="viewAllPreImages.html" type="text/ng-template">
	<div class="ngdialog-message" >	 
		<wallop-slider
			data-images="images"
			data-animation="rotate"
			data-current-item-index="index"
			data-on-previous="updateTsPrevious()"
			data-on-next="updateTsNext()"
		></wallop-slider>
	</div>
</script>
<script id="viewPriscription.html" type="text/ng-template">
	<div class="ngdialog-message" >
		<div class="modal-header" >
			<h3 id="myModalLabel" >Prescription</h3>
		</div>
		<table class="table table-condensed" ng-bind-html="allPriscription" >
		</table>
	</div>
</script>
